Other Type Definitions

The following type definitions are available globally.

  • A block to be called once loggingLevel is set to a higher value than DingiLoggingLevelNone.

    Declaration

    Objective-C

    typedef void (^DingiLoggingBlockHandler)(DingiLoggingLevel, NSString *_Nonnull,
                                             NSUInteger, NSString *_Nonnull)

    Swift

    typealias DingiLoggingBlockHandler = (DingiLoggingLevel, String, UInt, String) -> Void

    Parameters

    loggingLevel

    The message logging level.

    filePath

    The description of the file and method for the calling message.

    line

    The line where the message is logged.

    message

    The logging message.

  • A block to processes the result or error of a snapshot request.

    Declaration

    Objective-C

    typedef void (^DingiMapSnapshotCompletionHandler)(DingiMapSnapshot *_Nullable,
                                                      NSError *_Nullable)

    Swift

    typealias DingiMapSnapshotCompletionHandler = (DingiMapSnapshot?, Error?) -> Void

    Parameters

    snapshot

    The DingiMapSnapshot that was generated or nil if an error occurred.

    error

    The error that occured or nil when successful.

  • A key in the userInfo property of a notification posted by DingiOfflinePack.

    Declaration

    Objective-C

    typedef NSString *DingiOfflinePackUserInfoKey

    Swift

    struct DingiOfflinePackUserInfoKey : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
  • A block to be called once an offline pack has been completely created and added.

    An application typically calls the -resume method on the pack inside this completion handler to begin the download.

    Declaration

    Objective-C

    typedef void (^DingiOfflinePackAdditionCompletionHandler)(
        DingiOfflinePack *_Nullable, NSError *_Nullable)

    Swift

    typealias DingiOfflinePackAdditionCompletionHandler = (DingiOfflinePack?, Error?) -> Void

    Parameters

    pack

    Contains a pointer to the newly added pack, or nil if there was an error creating or adding the pack.

    error

    Contains a pointer to an error object (if any) indicating why the pack could not be created or added.

  • A block to be called once an offline pack has been completely invalidated and removed.

    Avoid any references to the pack inside this completion handler: by the time this completion handler is executed, the pack has become invalid, and any messages passed to it will raise an exception.

    Declaration

    Objective-C

    typedef void (^DingiOfflinePackRemovalCompletionHandler)(NSError *_Nullable)

    Swift

    typealias DingiOfflinePackRemovalCompletionHandler = (Error?) -> Void

    Parameters

    error

    Contains a pointer to an error object (if any) indicating why the pack could not be invalidated or removed.

  • A block to be called once the contents of a file are copied into the current packs.

    Declaration

    Objective-C

    typedef void (^DingiBatchedOfflinePackAdditionCompletionHandler)(
        NSURL *_Nonnull, NSArray<DingiOfflinePack *> *_Nullable, NSError *_Nullable)

    Swift

    typealias DingiBatchedOfflinePackAdditionCompletionHandler = (URL, [DingiOfflinePack]?, Error?) -> Void

    Parameters

    fileURL

    The file URL of the offline database containing the offline packs that were copied.

    packs

    An array of all known offline packs, or nil if there was an error creating or adding the pack.

    error

    A pointer to an error object (if any) indicating why the pack could not be created or added.

  • Options for DingiShapeSource objects.

    Declaration

    Objective-C

    typedef NSString *DingiShapeSourceOption

    Swift

    struct DingiShapeSourceOption : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
  • Options for DingiTileSource objects.

    Declaration

    Objective-C

    typedef NSString *DingiTileSourceOption

    Swift

    struct DingiTileSourceOption : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable